<template>
  <div class="handlerBar">
    <el-button
      :class="[`${item.class}btn`, 'handlerBtn']"
      :type="item.type"
      :plain="item.plain"
      v-for="item in handlerBtns"
      :key="item.name"
      :icon="item.icon"
      @click="item.func"
    >
      {{ item.name }}
    </el-button>
  </div>
</template>

<script setup lang="ts" name="handlerBar">
type HandlerBtns = {
  class: string;
  name: string;
  type: any;
  icon: any;
  plain: boolean;
  func?: Function;
};
defineProps<{ handlerBtns: HandlerBtns[] }>();
</script>

<style scoped lang="scss">
.handlerBtn {
  padding: 0 20px;
  margin: 0 15px;
}
</style>
